package com.yilin.tms.core.entity.order.transit;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.tms.core.commons.base.BaseOrganizeEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 运单实体类
 *
 * @author yhp
 * @date 2024/6/18
 */
@Entity
@Table(name = "transit_ordinary_order")
@TableName("transit_ordinary_order")
public class TransitOrdinaryOrder extends BaseOrganizeEntity {

    //运单状态
    public enum TransitStatus {
        create(0, "创建成功/需要司机修改信息"),
        auditing(1, "审核中"),
        payment(2, "付款中"),
        success(3, "完成"),
        cancel(4, "作废");
        @EnumValue
        public Integer index;
        public String name;
        TransitStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    /**
     * 基础信息
     */
    @Column(name = "transit_status")
    private TransitStatus transitStatus; //运输状态
    @Column(name = "transit_no")
    private String  transitNo; //运单号
    @Column(name = "goods_name")
    private String goodsName; //货物名称
    @Column(name = "truck_id")
    private String truckId; //车辆id
    @Column(name = "truck_no")
    private String truckNo; //车牌号
    @Column(name = "trailer_no")
    private String trailerNo; //挂车牌号
    @Column(name = "loading_name")
    private String loadingName; //装货商名称
    @Column(name = "loading_address")
    private String loadingAddress; //装货地址
    @Column(name = "loading_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date loadingDate=new Date(); //装货日期
    @Column(name = "loading_img_url")
    private String loadingImgUrl; //装货磅单图片
    @Column(name = "loading_weight")
    private Double loadingWeight; //装货磅单重量吨
    @Column(name = "unloading_name")
    private String unloadingName; //卸货商名称
    @Column(name = "unloading_address")
    private String unloadingAddress; //卸货商地址
    @Column(name = "unloading_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date unloadingDate=new Date(); //卸货日期
    @Column(name = "unloading_img_url")
    private String unloadingImgUrl; //卸货磅单图片
    @Column(name = "unloading_weight")
    private Double unloadingWeight; //卸货磅单重量吨
    @Column(name = "pound_difference")
    private Double poundDifference; //磅差
    @Column(name = "freight_unit_price")
    private Double freightUnitPrice; //运费单价
    @Column(name = "freight_cost")
    private Double freightCost; //总运费

    @Column(name = "remark")
    private String remark; //备注
    @Column(name = "return_remark")
    private String returnRemark; //退回说明
    @Column(name = "auditing_id")
    private String auditingId; //审核人Id
    @Column(name = "auditing_name")
    private String auditingName; //审核人名称
    @Column(name = "auditing_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditingDate; //审核时间
    @Column(name = "payment_id")
    private String paymentId; //付款人名称
    @Column(name = "payment_name")
    private String paymentName; //付款人名称
    @Column(name = "payment_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date paymentDate; //付款人时间
    @Column(name = "account_id")
    private String accountId; //运输人
    @Column(name = "account_name")
    private String accountName; //运输人名称

    public String getTrailerNo() {
        return trailerNo;
    }

    public void setTrailerNo(String trailerNo) {
        this.trailerNo = trailerNo;
    }

    public Date getAuditingDate() {
        return auditingDate;
    }

    public void setAuditingDate(Date auditingDate) {
        this.auditingDate = auditingDate;
    }

    public Date getPaymentDate() {
        return paymentDate;
    }

    public void setPaymentDate(Date paymentDate) {
        this.paymentDate = paymentDate;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getAuditingId() {
        return auditingId;
    }

    public void setAuditingId(String auditingId) {
        this.auditingId = auditingId;
    }

    public String getAuditingName() {
        return auditingName;
    }

    public void setAuditingName(String auditingName) {
        this.auditingName = auditingName;
    }

    public String getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(String paymentId) {
        this.paymentId = paymentId;
    }

    public String getPaymentName() {
        return paymentName;
    }

    public void setPaymentName(String paymentName) {
        this.paymentName = paymentName;
    }

    public TransitStatus getTransitStatus() {
        return transitStatus;
    }

    public void setTransitStatus(TransitStatus transitStatus) {
        this.transitStatus = transitStatus;
    }

    public String getTransitNo() {
        return transitNo;
    }

    public void setTransitNo(String transitNo) {
        this.transitNo = transitNo;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getTruckId() {
        return truckId;
    }

    public void setTruckId(String truckId) {
        this.truckId = truckId;
    }

    public String getTruckNo() {
        return truckNo;
    }

    public void setTruckNo(String truckNo) {
        this.truckNo = truckNo;
    }

    public String getLoadingName() {
        return loadingName;
    }

    public void setLoadingName(String loadingName) {
        this.loadingName = loadingName;
    }

    public String getLoadingAddress() {
        return loadingAddress;
    }

    public void setLoadingAddress(String loadingAddress) {
        this.loadingAddress = loadingAddress;
    }

    public Date getLoadingDate() {
        return loadingDate;
    }

    public void setLoadingDate(Date loadingDate) {
        this.loadingDate = loadingDate;
    }

    public String getLoadingImgUrl() {
        return loadingImgUrl;
    }

    public void setLoadingImgUrl(String loadingImgUrl) {
        this.loadingImgUrl = loadingImgUrl;
    }

    public Double getLoadingWeight() {
        return loadingWeight;
    }

    public void setLoadingWeight(Double loadingWeight) {
        this.loadingWeight = loadingWeight;
    }

    public String getUnloadingName() {
        return unloadingName;
    }

    public void setUnloadingName(String unloadingName) {
        this.unloadingName = unloadingName;
    }

    public String getUnloadingAddress() {
        return unloadingAddress;
    }

    public void setUnloadingAddress(String unloadingAddress) {
        this.unloadingAddress = unloadingAddress;
    }

    public Date getUnloadingDate() {
        return unloadingDate;
    }

    public void setUnloadingDate(Date unloadingDate) {
        this.unloadingDate = unloadingDate;
    }

    public String getUnloadingImgUrl() {
        return unloadingImgUrl;
    }

    public void setUnloadingImgUrl(String unloadingImgUrl) {
        this.unloadingImgUrl = unloadingImgUrl;
    }

    public Double getUnloadingWeight() {
        return unloadingWeight;
    }

    public void setUnloadingWeight(Double unloadingWeight) {
        this.unloadingWeight = unloadingWeight;
    }

    public Double getPoundDifference() {
        return poundDifference;
    }

    public void setPoundDifference(Double poundDifference) {
        this.poundDifference = poundDifference;
    }

    public Double getFreightUnitPrice() {
        return freightUnitPrice;
    }

    public void setFreightUnitPrice(Double freightUnitPrice) {
        this.freightUnitPrice = freightUnitPrice;
    }

    public Double getFreightCost() {
        return freightCost;
    }

    public void setFreightCost(Double freightCost) {
        this.freightCost = freightCost;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getReturnRemark() {
        return returnRemark;
    }

    public void setReturnRemark(String returnRemark) {
        this.returnRemark = returnRemark;
    }
}
